package cn.cqie.attendance.student.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: xiehaodong
 * @Date: 2021/7/8 - 13:22
 * @Description: cn.cqie.attendance.student.domian
 * @version: 1.0
 */
@Data
@Accessors(chain = true)
@ApiModel(value="attendance", description="")
@Alias("attendance")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Attendance implements Serializable {

    /** 考勤Id */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 学生Id */
    @ApiModelProperty(value = "学生Id")
    private Long stuId;

    /** 考勤情况 */
    @ApiModelProperty(value = "0 正常 1 迟到 2 早退 3 请假 4 缺勤")
    private int status;

    /** 签到时间 */
    @ApiModelProperty(value = "签到时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date signinTime;

    /** 签退时间 */
    @ApiModelProperty(value = "签退时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date signoutTime;

    /** 打卡设备 */
    @ApiModelProperty(value = "打卡设备")
    private String punchdevice;

    /** 打卡日期 */
    @ApiModelProperty(value = "打卡日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date punchDate;

    /** 请假Id */
    @ApiModelProperty(value = "请假Id")
    private Long leaveId;

}
